package com.hua.yuan.util;
import android.app.Activity;
import android.content.Intent;
import com.hua.yuan.base.Constents;
import com.hua.yuan.ui.LoginActivity;
import cm.hua.yuan.common.utils.PreferenceUtils;

/**
 * Created by huangyang on 2018/6/5.
 * 检查是否登录过
 */

public class CheckLoginUtil {


    /**
     * 是否登录过
     * @return true登录过 false没有登录
     */
    public static boolean check(){
        return PreferenceUtils.getBoolean(Constents.IS_LOGIN,false);
    }

    /**
     * 登录界面
     * @param activity activity
     */
    public static void goToLogin(Activity activity){

        if (activity != null){
            activity.startActivity(new Intent(activity, LoginActivity.class));
        }

    }



}
